﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
#parse("common/head.html")
<link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<link rel="stylesheet" type="text/css" href="../css/style.css">
<link rel="stylesheet" type="text/css" href="../css/h_index.css">
<link href="../css/validationEngine.jquery.css" rel="stylesheet" type="text/css">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
<style   type="text/css">
a:hover{text-decoration:underline; color: red;}
</style>
<!--[if IE 7]>
<link rel="stylesheet" href="/css/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->
</head>
<body>
<div class="rediv pt30 pb30 ">
<div class="redivr" style="border-right:1px solid #DDDDDD;">
  <div class="retext01" >用户注册</div>
  <div class="retext02"> 填写注册信息&nbsp;&nbsp;<span class="retext03">(标准<span class="retext05">*</span>为必填项，其它为选填)</span></div>
  <div class="redivrm retext04 inp text01 mt30">
    <form name="form1"  id="register" action="$!{form.domain}/member/register" method="post">
      <p><span class="registerSpan">用户名：</span>
        <input type="text" name="user.userLnm" id="user_userLnm" maxlength="20"  value=""/>
        <span class="retext05 ml10">*
        <span id="user_userLnm_error" class="ml10">$!{form.errors["userLnm"]}</span></span> </p>
      <p> <span class="registerSpan">手机号：</span>
        <input type="text" name="user.userMobile"" id="user_userMobile" maxlength="50"  value=""/>
        <span class="retext05 ml10">*
        <span id="user_userMobile_error"  class="ml10"> $!{form.errors["userMobile"]}</span></span> </p>
      <p> <span class="registerSpan">电子邮箱：</span>
        <input type="text" name="user.userEmail" id="user_userEmail" maxlength="100"  value=""/>
        <span class="retext05 ml10">*
        <span id="user_userEmail_error"  class="ml10">$!{form.errors["userEmail"]}</span></span></p>
      <p> <span class="registerSpan">设置密码：</span>
        <input type="password" id="password" name="user.userPass" maxlength="32" id="pwd" value=""/>
        <span class="retext05 ml10">*
        <span id="password_error"  class="ml10">$!{form.errors["userPass"]}</span></span> </p>
      <p> <span class="registerSpan">确认密码：</span>
        <input type="password" id="confirm_password" name="confirmPassword" maxlength="32" id="repwd" value=""/>
        <span class="retext05 ml10">*
        <span id="confirm_password_error"  class="ml10">$!{form.errors["confirmPassword"]}</span></span> </p>
      <p> <span class="registerSpan">验证：</span>
        <input type="text" name="checkCode" id="check_code" value=""/>
        <a href="javascript:refreshCode();" ><img id="register_code" src="$!{form.domain}/validateimage/getcode" onclick="refreshCode();"  height="20">看不清？换一张</a></p>
    </form>
    <div class="redivrb mt30">
      <p class="txtCenter">
        <input name="agreement" id="agreement" type="checkbox" value="1" />
        我已阅读并同意<a href="$!{form.domain}/intro/yhxy.html" target="_blank" onMouseOver="">《用户服务协议》</a> <span class="ml10">已有账号</span><a class="retext06" href="$!{form.domain}/member/login">请登录</a></p>
      <img id="disable_img" src="../images/zc_disable.png" onclick=""> <a id="submit_link" href="javascript:register();"> <img id="submit_img" style="display: none;" src="../images/zc.jpg"></a> </div>
  <div class="clearfix"></div>
  </div>
</div>
<div class="redivl">
  <div class="retext08"> 已是注册用户？&nbsp;&nbsp;&nbsp;&nbsp;<a href="$!{form.domain}/member/login"><span class="retext06">去登录</span></a></div>
  <p class="ml70 mt30">使用合作网站账号登陆</p>
  <div class="redivlm"> <a href="#"><img src="../images/QQ.jpg"></a> <a href="#"><img src="../images/sina.jpg"></a> <a href="#"><img src="../images/renren.jpg"></a> </div>
</div>
  <div class="clearfix"></div>
  </div>
<script type="text/javascript">
$(document).ready(function(){
	$('#agreement').click(function () {
	  // “我已阅读并同意<用户服务协议>”是否选中
	  if ($('#agreement').attr("checked")) {
	      $('#submit_img').show();
	      $('#disable_img').hide();
	  } else {
	      $('#submit_img').hide();
	      $('#disable_img').show();
	  }
	});
})

function refreshCode(){
  var nowDate = new Date();
  $("#register_code").attr("src","$!{form.domain}/validateimage/getcode?d="+nowDate.getTime());
}

function register(){
	var userName = $("#user_userLnm").val();
	var mobile = $("#user_userMobile").val();
	var email = $("#user_userEmail").val();
	var password = $("#password").val();
	var confirmPwd = $("#confirm_password").val();
	var checkCode = $("#check_code").val();
	$("#user_userLnm_error").html("")
	$("#user_userMobile_error").html("");
	$("#user_userMobile_error").html("");
	$("#password_error").html("");
	$("#confirm_password_error").html("");
	if(userName == null || userName == ""){
		$("#user_userLnm_error").html("用户名不能为空.")
		return ;
	}else if(mobile == null || mobile == ""){
		$("#user_userMobile_error").html("手机号不能为空.");
		return ;
	}else if(email == null || email == ""){
		$("#user_userEmail").html("电子邮箱不能为空.");
		return ;
	}else if(password == null || password == ""){
		$("#password_error").html("密码不能为空.");
		return ;
	}else if(password.length < 6){
		$("#password_error").html("密码长度至少6位.");
		return ;
	}else if(confirmPwd == null || confirmPwd == ""){
		$("#confirm_password_error").html("确认密码不能为空.");
		return ;
	}else if(password != confirmPwd){
		$("#confirm_password_error").html("密码与确认密码不一致.");
		return ;
	}else if(checkCode == null || checkCode == ""){
		$("#user_userLnm_error").html("校验码不能为空.");
		return ;
	}
	$('#register').submit();
}
</script>
</body>
</html>